class Profile
  include DataMapper::Resource
  storage_names[:default] = "Profile"  

  property :id,          Serial  
  property :user_id,     Integer
  property :first_name,  String,        :required => true, :length => 500
  property :last_name,   String,        :required => true, :length => 500
  property :sex,         Integer,       :required => true
  property :card_id,     String,        :length => 500
  property :birthday,    Date
  property :address,     String,        :length => 500
  property :district,    String,        :length => 500
  property :city_id,     Integer
  property :email,       String,        :required => true, :format => :email_address, :length => 500
  property :telephone,   String,        :length => 500
  property :mobile,      String,        :length => 500
  property :description, Text,          :lazy => false
  timestamps :at 

  belongs_to :user
  belongs_to :city

  SEX = {"None" => 0, "Male" => 1, "Female" => 2}
end
